<template>
<!-- 授权信息 -->
  <div style="height:520px">
    <FormPanel  
        ref="formPanel"
        :list="initForm"   
        :cols="2"          
        :labelWidth="110"  
        :isSubmitBtn="false"  
        :formType="value.type"
        class="mtop"
     />
  </div>
</template>

<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  name:'infoBase',
  mixins: [dictionary],
  props:{
    value: {
      type: Object,
      required: true
    },
  },
  data() {
    return {
      initForm : this.initFormFun()
    };
  },
  mounted() {
    console.log(this.value) //获取到行id 
    //请求接口进行赋值，自己写吧
  },
  methods: {
    //搜索数据
    initFormFun(){
        return [{
              type: 'SELECT',
              label: '是否边建边销',
              fieldName: 'field1',
              placeholder: '请选择',
              initialValue: "",
              itemList: this.createDictList('1008'),
              rules: [{
                required: true,
                message: '必填',
                trigger: 'change'
              }]
            },{
              type: 'SELECT',
              label: '是否边建边修',
              fieldName: 'field2',
              placeholder: '请选择',
              initialValue: "",
              itemList: this.createDictList('1008'),
              rules: [{
                required: true,
                message: '必填',
                trigger: 'change'
              }]
            },{
              type: 'INPUT',
              label: '临时工时',
              fieldName: 'field3',
              initialValue: ''
            }
        ]
    }
  },
}
</script>